<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    </meta>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        body {
            font-family: Microsoft YaHei;
        }

        td,
        th {
            padding: 10px;
            border: .5px solid #e8e8e8;
        }

        th {
            text-align: center
        }

        td {
            font-size: 12px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            padding: 15px;
        }

        .card {
            box-shadow: 0 0 20px 0 #dbdbdb;
            padding: 0 10px 10px 10px;
            border: 1px solid #e8e8e8;
        }

        .card .row {
            padding: 20px 10px;
            border-bottom: .5px solid #e8e8e8;
        }

        hr {
            border: 1px solid #e8e8e8;
            margin: 20px 0;
        }

        .title {
            font-weight: bold;
            text-align: center;
            height: 40px;
            line-height: 40px;
            margin-top: 20px;
        }

        .bottom {
            margin-bottom: 30px;
            padding: 15px 30px;
        }

        .bottom .header {
            font-size: 20px;
            font-weight: bold;
            text-align: center;
        }

        .bottom .tips {
            font-size: 12px;
            color: gray;
            text-align: center;
        }
    </style>
</head>

<body>
    <!-- 标题部分 -->
    <div style="text-align: center;width: 100%;margin-top: 20px;margin-bottom: 20px;">
        <h2>${project.projectName}</h2>
        <div style="font-size: 12px;margin-top:10px">${project.projectInfo}</div>
        <div style="font-size: 12px;margin-top: 10px;line-height: 15px;text-align: left;">
            <b>项目创建者: ${projectCreate.nickname} 
                <div style="margin-top: 10px;"></div>
                项目创建时间: ${(project.createTime?string('yyyy-MM-dd HH:mm:ss'))!}</b>
        </div>
    </div>

    <!-- API部分 -->
    <#list apis as data>
        <div style="padding: 10px;">
            <div class="card">
                <div class="title">${data.name}</div>
                <div class="row">
                    <div style="margin-bottom: 15px;">
                        <b>HTTP URL</b>
                    </div>
                    ${data.url?html}
                </div>
                <div class="row">
                    <div style="margin-bottom: 15px;">
                        <b>Method</b>
                    </div>
					<#if data.method=='unlimited'>
                        无限制
                        <#else>
                        ${data.method}
                    </#if>
                </div>
                <div class="row">
                    <div style="margin-bottom: 15px;">
                        <b>Param</b>
                    </div>
                    <div style="margin-top: 10px;">
                        <table class="table param">
                            <thead style="color: gray;font-size: 14px;">
                                <tr>
                                    <th>参数名称</th>
                                    <th>参数类型</th>
                                    <th>是否必须</th>
                                    <th>参数备注</th>
                                </tr>
                            </thead>
                            <tbody>
                                <!-- 此处循环api参数 -->
                                <#if (data.params?size>0) >
                                    <#list data.params as param>
                                        <tr>
                                            <td>${param.paramName?html}</td>
                                            <td>${param.paramType?html}</td>
                                            <td>
                                                <#if param.isMust==1>
                                                    True
                                                    <#else>
                                                        False
                                                </#if>
                                            </td>
                                            <td>${param.paramNote?html}</td>
                                        </tr>
                                    </#list>
                                </#if>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="row">
                    <b>Success</b>
                    <div style="margin-top: 15px;">${data.success?html}</div>
                </div>
                <div class="row">
                    <b>Failure</b>
                    <div style="margin-top: 15px;">${data.failure?html}</div>
                </div>
                <div class="row">
                    <b>备注</b>
                    <div style="margin-top: 15px;">${data.note?html}</div>
                </div>
                <div class="row">
                    <b>其他信息</b>
                    <div style="font-size: 13px;line-height: 20px;margin-top: 15px;">
                        <div>创建者：${data.apiCreateName}</div>
                        <div>创建时间：${(data.createTime?string('yyyy-MM-dd HH:mm:ss'))!}</div>
                        <div>最后一次修改者：
                            <#if (data.apiUpdateName)??>
                                ${data.apiUpdateName}
                                <#else>
                                    暂无
                            </#if>
                        </div>
                        <div>最后一次修改时间：
                            <#if (data.updateTime)??>
                                ${(data.updateTime?string('yyyy-MM-dd HH:mm:ss'))!}
                                <#else>
                                    暂无
                            </#if>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <hr />
    </#list>
    <div class="bottom">
        <div class="header">LSE API</div>
        <div class="tips">简洁的API接口文档管理系统</div>
    </div>
</body>

</html>